Integrand size = 49, antiderivative size = 381 \[ \int \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx=-\frac {\sqrt {a-i b} (i A+B-i C) \sqrt {c-i d} \text {arctanh}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}-\frac {\sqrt {a+i b} (B-i (A-C)) \sqrt {c+i d} \text {arctanh}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{f}-\frac {\left (a^2 C d^2-2 a b d (c C+2 B d)+b^2 \left (c^2 C-4 B c d-8 (A-C) d^2\right )\right ) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{4 b^{3/2} d^{3/2} f}-\frac {(b c C-4 b B d-a C d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{4 b d f}+\frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f} \]
-1/4*(a^2*C*d^2-2*a*b*d*(2*B*d+C*c)+b^2*(c^2*C-4*B*c*d-8*(A-C)*d^2))*arcta nh(d^(1/2)*(a+b*tan(f*x+e))^(1/2)/b^(1/2)/(c+d*tan(f*x+e))^(1/2))/b^(3/2)/ d^(3/2)/f-(I*A+B-I*C)*arctanh((c-I*d)^(1/2)*(a+b*tan(f*x+e))^(1/2)/(a-I*b) ^(1/2)/(c+d*tan(f*x+e))^(1/2))*(a-I*b)^(1/2)*(c-I*d)^(1/2)/f-(B-I*(A-C))*a rctanh((c+I*d)^(1/2)*(a+b*tan(f*x+e))^(1/2)/(a+I*b)^(1/2)/(c+d*tan(f*x+e)) ^(1/2))*(a+I*b)^(1/2)*(c+I*d)^(1/2)/f-1/4*(-4*B*b*d-C*a*d+C*b*c)*(a+b*tan( f*x+e))^(1/2)*(c+d*tan(f*x+e))^(1/2)/b/d/f+1/2*C*(a+b*tan(f*x+e))^(1/2)*(c +d*tan(f*x+e))^(3/2)/d/f
Time = 7.94 (sec) , antiderivative size = 619, normalized size of antiderivative = 1.62 \[ \int \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx=\frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f}+\frac {\frac {(-b c C+4 b B d+a C d) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{2 b f}+\frac {\frac {2 b d \left (b (A b c+a B c-b c C+a A d-b B d-a C d)-\sqrt {-b^2} (b B c+b (A-C) d-a (A c-c C-B d))\right ) \text {arctanh}\left (\frac {\sqrt {-c+\frac {\sqrt {-b^2} d}{b}} \sqrt {a+b \tan (e+f x)}}{\sqrt {-a+\sqrt {-b^2}} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {-a+\sqrt {-b^2}} \sqrt {-c+\frac {\sqrt {-b^2} d}{b}}}-\frac {2 b d \left (b (A b c+a B c-b c C+a A d-b B d-a C d)+\sqrt {-b^2} (b B c+b (A-C) d-a (A c-c C-B d))\right ) \text {arctanh}\left (\frac {\sqrt {c+\frac {\sqrt {-b^2} d}{b}} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+\sqrt {-b^2}} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {a+\sqrt {-b^2}} \sqrt {c+\frac {\sqrt {-b^2} d}{b}}}-\frac {\sqrt {b} \sqrt {c-\frac {a d}{b}} \left (a^2 C d^2-2 a b d (c C+2 B d)+b^2 \left (c^2 C-4 B c d-8 (A-C) d^2\right )\right ) \text {arcsinh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c-\frac {a d}{b}}}\right ) \sqrt {\frac {b c+b d \tan (e+f x)}{b c-a d}}}{2 \sqrt {d} \sqrt {c+d \tan (e+f x)}}}{b^2 f}}{2 d} \]
Integrate[Sqrt[a + b*Tan[e + f*x]]*Sqrt[c + d*Tan[e + f*x]]*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2),x]
(C*Sqrt[a + b*Tan[e + f*x]]*(c + d*Tan[e + f*x])^(3/2))/(2*d*f) + (((-(b*c *C) + 4*b*B*d + a*C*d)*Sqrt[a + b*Tan[e + f*x]]*Sqrt[c + d*Tan[e + f*x]])/ (2*b*f) + ((2*b*d*(b*(A*b*c + a*B*c - b*c*C + a*A*d - b*B*d - a*C*d) - Sqr t[-b^2]*(b*B*c + b*(A - C)*d - a*(A*c - c*C - B*d)))*ArcTanh[(Sqrt[-c + (S qrt[-b^2]*d)/b]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[-a + Sqrt[-b^2]]*Sqrt[c + d*Tan[e + f*x]])])/(Sqrt[-a + Sqrt[-b^2]]*Sqrt[-c + (Sqrt[-b^2]*d)/b]) - ( 2*b*d*(b*(A*b*c + a*B*c - b*c*C + a*A*d - b*B*d - a*C*d) + Sqrt[-b^2]*(b*B *c + b*(A - C)*d - a*(A*c - c*C - B*d)))*ArcTanh[(Sqrt[c + (Sqrt[-b^2]*d)/ b]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[a + Sqrt[-b^2]]*Sqrt[c + d*Tan[e + f*x] ])])/(Sqrt[a + Sqrt[-b^2]]*Sqrt[c + (Sqrt[-b^2]*d)/b]) - (Sqrt[b]*Sqrt[c - (a*d)/b]*(a^2*C*d^2 - 2*a*b*d*(c*C + 2*B*d) + b^2*(c^2*C - 4*B*c*d - 8*(A - C)*d^2))*ArcSinh[(Sqrt[d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[b]*Sqrt[c - ( a*d)/b])]*Sqrt[(b*c + b*d*Tan[e + f*x])/(b*c - a*d)])/(2*Sqrt[d]*Sqrt[c + d*Tan[e + f*x]]))/(b^2*f))/(2*d)
Time = 2.19 (sec) , antiderivative size = 389, normalized size of antiderivative = 1.02, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.204, Rules used = {3042, 4130, 27, 3042, 4130, 27, 3042, 4138, 2348, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan (e+f x)^2\right )dx\) |
\(\Big \downarrow \) 4130 |
\(\displaystyle \frac {\int -\frac {\sqrt {c+d \tan (e+f x)} \left ((b c C-a d C-4 b B d) \tan ^2(e+f x)-4 (A b-C b+a B) d \tan (e+f x)+b c C-a (4 A-3 C) d\right )}{2 \sqrt {a+b \tan (e+f x)}}dx}{2 d}+\frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f}-\frac {\int \frac {\sqrt {c+d \tan (e+f x)} \left ((b c C-a d C-4 b B d) \tan ^2(e+f x)-4 (A b-C b+a B) d \tan (e+f x)+b c C-a (4 A-3 C) d\right )}{\sqrt {a+b \tan (e+f x)}}dx}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f}-\frac {\int \frac {\sqrt {c+d \tan (e+f x)} \left ((b c C-a d C-4 b B d) \tan (e+f x)^2-4 (A b-C b+a B) d \tan (e+f x)+b c C-a (4 A-3 C) d\right )}{\sqrt {a+b \tan (e+f x)}}dx}{4 d}\) |
\(\Big \downarrow \) 4130 |
\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f}-\frac {\frac {\int \frac {c (c C+4 B d) b^2-2 a d (4 A c-3 C c-2 B d) b-8 d (A b c+a B c-b C c+a A d-b B d-a C d) \tan (e+f x) b+a^2 C d^2-\left (8 b (A b-C b+a B) d^2-(b c-a d) (b c C-a d C-4 b B d)\right ) \tan ^2(e+f x)}{2 \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}dx}{b}+\frac {(-a C d-4 b B d+b c C) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}}{4 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f}-\frac {\frac {\int \frac {c (c C+4 B d) b^2-2 a d (4 A c-3 C c-2 B d) b-8 d (A b c+a B c-b C c+a A d-b B d-a C d) \tan (e+f x) b+a^2 C d^2-\left (8 b (A b-C b+a B) d^2-(b c-a d) (b c C-a d C-4 b B d)\right ) \tan ^2(e+f x)}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}dx}{2 b}+\frac {(-a C d-4 b B d+b c C) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f}-\frac {\frac {\int \frac {c (c C+4 B d) b^2-2 a d (4 A c-3 C c-2 B d) b-8 d (A b c+a B c-b C c+a A d-b B d-a C d) \tan (e+f x) b+a^2 C d^2-\left (8 b (A b-C b+a B) d^2-(b c-a d) (b c C-a d C-4 b B d)\right ) \tan (e+f x)^2}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}dx}{2 b}+\frac {(-a C d-4 b B d+b c C) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}}{4 d}\) |
\(\Big \downarrow \) 4138 |
\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f}-\frac {\frac {\int \frac {c (c C+4 B d) b^2-2 a d (4 A c-3 C c-2 B d) b-8 d (A b c+a B c-b C c+a A d-b B d-a C d) \tan (e+f x) b+a^2 C d^2-\left (8 b (A b-C b+a B) d^2-(b c-a d) (b c C-a d C-4 b B d)\right ) \tan ^2(e+f x)}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (\tan ^2(e+f x)+1\right )}d\tan (e+f x)}{2 b f}+\frac {(-a C d-4 b B d+b c C) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}}{4 d}\) |
\(\Big \downarrow \) 2348 |
\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f}-\frac {\frac {(-a C d-4 b B d+b c C) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}+\frac {\int \left (\frac {-8 A d^2 b^2+8 C d^2 b^2+c^2 C b^2-4 B c d b^2-4 a B d^2 b-2 a c C d b+a^2 C d^2}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}+\frac {-8 B d^2 b^2+8 A c d b^2-8 c C d b^2+8 a A d^2 b-8 a C d^2 b+8 a B c d b+i \left (8 A d^2 b^2-8 C d^2 b^2+8 B c d b^2+8 a B d^2 b-8 a A c d b+8 a c C d b\right )}{2 (i-\tan (e+f x)) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}+\frac {8 B d^2 b^2-8 A c d b^2+8 c C d b^2-8 a A d^2 b+8 a C d^2 b-8 a B c d b+i \left (8 A d^2 b^2-8 C d^2 b^2+8 B c d b^2+8 a B d^2 b-8 a A c d b+8 a c C d b\right )}{2 (\tan (e+f x)+i) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}\right )d\tan (e+f x)}{2 b f}}{4 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} (c+d \tan (e+f x))^{3/2}}{2 d f}-\frac {\frac {(-a C d-4 b B d+b c C) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}+\frac {\frac {2 \left (a^2 C d^2-2 a b d (2 B d+c C)+b^2 \left (-8 d^2 (A-C)-4 B c d+c^2 C\right )\right ) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {b} \sqrt {d}}+8 b d \sqrt {a-i b} \sqrt {c-i d} (B+i (A-C)) \text {arctanh}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )-8 b d \sqrt {a+i b} \sqrt {c+i d} (i A-B-i C) \text {arctanh}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{2 b f}}{4 d}\) |
Int[Sqrt[a + b*Tan[e + f*x]]*Sqrt[c + d*Tan[e + f*x]]*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2),x]
(C*Sqrt[a + b*Tan[e + f*x]]*(c + d*Tan[e + f*x])^(3/2))/(2*d*f) - ((8*Sqrt [a - I*b]*b*(B + I*(A - C))*Sqrt[c - I*d]*d*ArcTanh[(Sqrt[c - I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[a - I*b]*Sqrt[c + d*Tan[e + f*x]])] - 8*Sqrt[a + I*b]*b*(I*A - B - I*C)*Sqrt[c + I*d]*d*ArcTanh[(Sqrt[c + I*d]*Sqrt[a + b*T an[e + f*x]])/(Sqrt[a + I*b]*Sqrt[c + d*Tan[e + f*x]])] + (2*(a^2*C*d^2 - 2*a*b*d*(c*C + 2*B*d) + b^2*(c^2*C - 4*B*c*d - 8*(A - C)*d^2))*ArcTanh[(Sq rt[d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[b]*Sqrt[c + d*Tan[e + f*x]])])/(Sqrt [b]*Sqrt[d]))/(2*b*f) + ((b*c*C - 4*b*B*d - a*C*d)*Sqrt[a + b*Tan[e + f*x] ]*Sqrt[c + d*Tan[e + f*x]])/(b*f))/(4*d)
3.2.30.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(Px_)*((c_) + (d_.)*(x_))^(m_.)*((e_) + (f_.)*(x_))^(n_.)*((a_.) + (b_. )*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Px*(c + d*x)^m*(e + f*x)^ n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[P x, x] && (IntegerQ[p] || (IntegerQ[2*p] && IntegerQ[m] && ILtQ[n, 0])) && !(IGtQ[m, 0] && IGtQ[n, 0])
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_. ) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*(a + b*Tan[e + f*x])^m*((c + d*Tan[ e + f*x])^(n + 1)/(d*f*(m + n + 1))), x] + Simp[1/(d*(m + n + 1)) Int[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^n*Simp[a*A*d*(m + n + 1) - C *(b*c*m + a*d*(n + 1)) + d*(A*b + a*B - b*C)*(m + n + 1)*Tan[e + f*x] - (C* m*(b*c - a*d) - b*B*d*(m + n + 1))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[ c, 0] && NeQ[a, 0])))
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, S imp[ff/f Subst[Int[(a + b*ff*x)^m*(c + d*ff*x)^n*((A + B*ff*x + C*ff^2*x^ 2)/(1 + ff^2*x^2)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f , A, B, C, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
Timed out.
\[\int \sqrt {a +b \tan \left (f x +e \right )}\, \sqrt {c +d \tan \left (f x +e \right )}\, \left (A +B \tan \left (f x +e \right )+C \tan \left (f x +e \right )^{2}\right )d x\]
Leaf count of result is larger than twice the leaf count of optimal. 34031 vs. \(2 (308) = 616\).
Time = 161.87 (sec) , antiderivative size = 68078, normalized size of antiderivative = 178.68 \[ \int \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx=\text {Too large to display} \]
integrate((a+b*tan(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(1/2)*(A+B*tan(f*x+e)+C* tan(f*x+e)^2),x, algorithm="fricas")
\[ \int \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx=\int \sqrt {a + b \tan {\left (e + f x \right )}} \sqrt {c + d \tan {\left (e + f x \right )}} \left (A + B \tan {\left (e + f x \right )} + C \tan ^{2}{\left (e + f x \right )}\right )\, dx \]
integrate((a+b*tan(f*x+e))**(1/2)*(c+d*tan(f*x+e))**(1/2)*(A+B*tan(f*x+e)+ C*tan(f*x+e)**2),x)
Integral(sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)**2), x)
\[ \int \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx=\int { {\left (C \tan \left (f x + e\right )^{2} + B \tan \left (f x + e\right ) + A\right )} \sqrt {b \tan \left (f x + e\right ) + a} \sqrt {d \tan \left (f x + e\right ) + c} \,d x } \]
integrate((a+b*tan(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(1/2)*(A+B*tan(f*x+e)+C* tan(f*x+e)^2),x, algorithm="maxima")
integrate((C*tan(f*x + e)^2 + B*tan(f*x + e) + A)*sqrt(b*tan(f*x + e) + a) *sqrt(d*tan(f*x + e) + c), x)
\[ \int \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx=\int { {\left (C \tan \left (f x + e\right )^{2} + B \tan \left (f x + e\right ) + A\right )} \sqrt {b \tan \left (f x + e\right ) + a} \sqrt {d \tan \left (f x + e\right ) + c} \,d x } \]
integrate((a+b*tan(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(1/2)*(A+B*tan(f*x+e)+C* tan(f*x+e)^2),x, algorithm="giac")
integrate((C*tan(f*x + e)^2 + B*tan(f*x + e) + A)*sqrt(b*tan(f*x + e) + a) *sqrt(d*tan(f*x + e) + c), x)
Timed out. \[ \int \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right ) \, dx=\text {Hanged} \]